<?php

namespace App\Services\Core\Store\Weishi;

use Prophecy\Exception\Exception;
use App\Helpers\Http\HttpCurl;

/**
*
* 伟仕电销系统服务
*
*/
class WeishiService
{

    // 数据提供商的验证信息
    protected $dataProvider = 'CQWS-XH-006';
    // 伟仕电销系统对接地址
    protected $weishiUrl = 'http://www.yeeloan.com/yeeloan/api/push/pushPhone';


   /**
    * 伟仕电销系统对接推送
    *
    */ 
    public function send($data)
    {

        // 伟仕电销请求参数
        $params = array(
            'data'         => '',
            'dataProvider' => $this->dataProvider
        );
        $params['data'][] = $data;
        $params = json_encode($params);
        // 发送请求
        $response = HttpCurl::i()->POST($this->weishiUrl ,$params ,null ,null ,'application/json;charset=UTF-8');

        return $response;
    }


}
